aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/payment/[id]
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
committerAdam Soltys <[email protected]>2026-02-11 20:10:43 -0800
commit56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch)
treed6bc2557c56b93177bb14aa376847c6e123a4862 /src/routes/(app)/payment/[id]
parent13466248004327e9a026cb89f94926f9b060d1c1 (diff)
downloadcoinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz
coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip
format
Diffstat (limited to 'src/routes/(app)/payment/[id]')
-rw-r--r--src/routes/(app)/payment/[id]/+page.svelte49
-rw-r--r--src/routes/(app)/payment/[id]/plain/+page.svelte12
2 files changed, 13 insertions, 48 deletions
diff --git a/src/routes/(app)/payment/[id]/+page.svelte b/src/routes/(app)/payment/[id]/+page.svelte
index 436a7ab6..b8a4223d 100644
--- a/src/routes/(app)/payment/[id]/+page.svelte
+++ b/src/routes/(app)/payment/[id]/+page.svelte
@@ -2,18 +2,7 @@
import { browser } from "$app/environment";
import { onMount, tick } from "svelte";
import { t, loading } from "$lib/translations";
- import {
- copy,
- f,
- s,
- loc,
- toFiat,
- post,
- sats,
- fail,
- success,
- types,
- } from "$lib/utils";
+ import { copy, f, s, loc, toFiat, post, sats, fail, success, types } from "$lib/utils";
import { fiat } from "$lib/store";
const toggleFiat = (e) => {
@@ -77,9 +66,7 @@
if (type === types.fund) a = 0 - a;
direction = a > 0 ? $t("payments.from") : $t("payments.to");
- if (direction)
- direction =
- direction[0].toUpperCase() + direction.substr(1, direction.length);
+ if (direction) direction = direction[0].toUpperCase() + direction.substr(1, direction.length);
});
</script>
@@ -98,11 +85,7 @@
</div>
{:else}
<div class="flex items-center gap-1">
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300"
- ></iconify-icon>
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"></iconify-icon>
{s(amount, userLocale)}
</div>
{/if}
@@ -152,11 +135,7 @@
</div>
<div class="text-secondary flex">
<div class="flex items-center">
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300"
- ></iconify-icon>
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"></iconify-icon>
{s((1 * sats) / rate)} =
{f(1, currency, userLocale, 0, 0)}
</div>
@@ -179,15 +158,17 @@
</a>
{:else if type === types.fund}
<a href={`/fund/${memo}`} class="btn btn-accent">
- <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"
- ></iconify-icon>{$t("payments.viewFund")}
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"></iconify-icon>{$t(
+ "payments.viewFund",
+ )}
</a>
{:else if memo?.includes("9734")}
{@const eid = JSON.parse(memo).tags.find((t) => t[0] === "e")[1]}
<a href={`/e/${eid}`} class="btn btn-accent">
<img src="/images/nostr.png" class="w-8" alt="Nostr" />
- <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"
- ></iconify-icon>{$t("payments.zappedEvent")}
+ <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300"></iconify-icon>{$t(
+ "payments.zappedEvent",
+ )}
</a>
{:else if memo}
<div>
@@ -220,10 +201,7 @@
rel="noreferrer">{txid}</a
>
</div>
- <button
- class="flex font-bold hover:opacity-80 mb-auto my-auto"
- onclick={() => copy(txid)}
- >
+ <button class="flex font-bold hover:opacity-80 mb-auto my-auto" onclick={() => copy(txid)}>
</button>
</div>
</div>
@@ -234,10 +212,7 @@
<span class="text-lg text-secondary">Path</span>
<div class="flex">
<div>{path}</div>
- <button
- class="flex font-bold hover:opacity-80 mb-auto my-auto"
- onclick={() => copy(path)}
- >
+ <button class="flex font-bold hover:opacity-80 mb-auto my-auto" onclick={() => copy(path)}>
</button>
</div>
</div>
diff --git a/src/routes/(app)/payment/[id]/plain/+page.svelte b/src/routes/(app)/payment/[id]/plain/+page.svelte
index 46197260..87ad2207 100644
--- a/src/routes/(app)/payment/[id]/plain/+page.svelte
+++ b/src/routes/(app)/payment/[id]/plain/+page.svelte
@@ -3,17 +3,7 @@
import { onMount } from "svelte";
import { browser } from "$app/environment";
import { t } from "$lib/translations";
- import {
- back,
- copy,
- f,
- s,
- toFiat,
- post,
- sats,
- success,
- types,
- } from "$lib/utils";
+ import { back, copy, f, s, toFiat, post, sats, success, types } from "$lib/utils";
import { fiat } from "$lib/store";
import Avatar from "$comp/Avatar.svelte";
import { format } from "date-fns";